package aop.test.proxy.autoproxy;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

/**
 * Created by Stimd
 * 项目地址：https://gitee.com/stimd/spring-wheel
 * 公众号：Java编程探微
 */
public class LoggerInterceptor implements MethodInterceptor {

    @Override
    public Object invoke(MethodInvocation invocation) throws Throwable {
        System.out.println("日志拦截: " + invocation.getThis().getClass().getSimpleName()
                + " 方法：" + invocation.getMethod().getName());
        return invocation.proceed();
    }
}
